<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../style/css/layout.css" rel="stylesheet" type="text/css" />
<link href="../style/css/date.css" rel="stylesheet" type="text/css" />
<link href="../style/css/font.css" rel="stylesheet" type="text/css" />
<script src="../style/js/date_select.js" type="text/javascript"></script>
<script src="../style/js/jquery-1.3.1.js" type="text/javascript"></script>
<script src="../style/js/jquery.bgiframe.js" type="text/javascript"></script>
<script>
jQuery.fn.selectCity = function(targetId) {
	var _seft = this;
	var targetId = $(targetId);

	this.click(function(){
		var A_top = $(this).offset().top + $(this).outerHeight(true);  //  1
		var A_left =  $(this).offset().left;
		targetId.bgiframe();
		targetId.show().css({"position":"absolute","top":A_top+"px" ,"left":A_left+"px"});
	});

	targetId.find("#selectSub :checkbox").click(function(){		
		targetId.find(":checkbox").attr("checked",false);
		$(this).attr("checked",true);	
		_seft.val( $(this).val() );
		targetId.hide();
	});

	$(document).click(function(event){
		if(event.target.id!=_seft.selector.substring(1)){
			targetId.hide();	
		}
	});

	targetId.click(function(e){
		e.stopPropagation(); //  2
	});

    return this;
}
 
$(function(){
	//test1:
	$("#w_location").selectCity("#selectItem2");
	//test2：
	$("#w_industry").selectCity("#selectItem");
});
 </script>
</head>

<body>
<?php
    @session_start();
	$companyId_Visited = 0;
	$id_employMsg = 0;
	if(!isset($_SESSION["Company_Id"]) && $_SESSION["Company_Id"] == null)
	{
		echo '<script>alert("请登录再进呐~~ ");window.location.href="../pages/login.php";</script>';
		exit();
	}
	else
	{
		$companyId_Visited = (int)$_SESSION["Company_Id"];
	}
	include("../class/company.class.php");
	include("../class/employ_message.class.php");
	$companyId_Visited = (int)$_SESSION["Company_Id"];
	//$id=$_GET["id"];
	$user = new Company();
	$user->GetUserDataById($companyId_Visited);
	$id_employMsg=$_GET["id_employMsg"];
	//echo '<script>alert("'.$id.'");</script>';
	$message = new EmployMessage();
	$message->GetMessageById($id_employMsg);
	require("../inc/top.php");
?>

<div class="mainpage_body">
    	<div class="mainpage_left">
        <div class="Recruitment_add_contain">
        	<form method="post" action="../action/action_employee_message_change.php">
       	  	<div class="Recruitment_add_title">招聘信息标题：</div>
          	<div class="Recruitment_add_input_box"><input type="text" class=" Recruitment_add_input" name="title" value="<?php echo $message->title?>"/></div>
            <div>
                <div class=" Recruitment_add_box2 left">
                    <div class="Recruitment_add_title_h">招聘职位：</div>
                    <div class="Recruitment_add_input_box_h"><input type="text" class="Recruitment_add_input_h" name="position" value="<?php echo $message->position?>"/></div>
                </div>
                <div class=" Recruitment_add_box2 right">
                    <div class="Recruitment_add_title_h" align="right">行业选择：</div>
                    <div class="Recruitment_add_input_box_h"><input type="text" readonly="readonly" class="Recruitment_add_input_h" id="w_industry" name="industry" value="<?php echo $message->industry?>"/></div>
                </div>
                <div class="clear"></div>
            </div>
            <div>
                <div class=" Recruitment_add_box2 left">
                    <div class="Recruitment_add_title_h">截止时间：</div>
                    <div class="Recruitment_add_input_box_h"><input type="text" readonly="readonly" class="Recruitment_add_input_h" id="date-input" name="date_deadline" value="<?php echo date("Y-m-d",$message->date_deadline)?>"/></div>
                </div>
                <div class=" Recruitment_add_box2 right">
                    <div class="Recruitment_add_title_h" align="right">工作地点：</div>
                    <div class="Recruitment_add_input_box_h"><input type="text" readonly="readonly"  class="Recruitment_add_input_h" id="w_location" name="place" value="<?php echo $message->place?>"/></div>
                </div>
                <div class="clear"></div>
            </div>
            <div>
                <div class=" Recruitment_add_box2 left">
                    <div class="Recruitment_add_title_h">薪资待遇：</div>
                    <div class="Recruitment_add_input_box_h">
                    	<input type="text" class="Recruitment_add_input_h" name="payment" value="<?php echo $message->payment?>" />               
                    </div>
                </div>
                <div class=" Recruitment_add_box2 right">
                    <div class="Recruitment_add_title_h" align="right">工作属性：</div>
                    <div class="Recruitment_add_input_box_h">
                    	<input type="radio" name="full_time" value="1" <?php if($message->job_attribute==1) echo 'checked= "checked "';?> /><label >全职</label>
                        <input type="radio" name="full_time" value="2" <?php if($message->job_attribute==2)  echo' checked="checked" ' ;?>/><label >实习</label>
                        
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
          	<div class="Recruitment_add_title">招聘信息内容：</div>
          	<input type="hidden" name="id" value=<?php echo '"'.$id_employMsg.'"';?>/>
          	<div class="Recruitment_add_textaera_box"><textarea class="Recruitment_add_textaera" name="content" ><?php echo $message->content?></textarea></div>
            <div class="Recruitment_add_btn_box" align="right"><input type="submit" class="Recruitment_add_btn" value="提 交" /></div>
            </form>
        </div>
	 	</div>
        
        <!--选择行业-->
		<div id="selectItem" class="selectItemhidden"> 
        	<div class="selectItem_top"></div>
			<div id="selectItemCount" class="selectItemcont"> 
                <div id="selectSub"> 
                    <input type="checkbox" name="hy01"  id="hy01" value="1"/><label for="hy01">计算机</label>
                    <input type="checkbox" name="hy02"  id="hy02" value="2"/><label for="hy02">自动化</label>
                    <input type="checkbox" name="hy03"  id="hy03" value="3"/><label for="hy03">通信</label>
                </div> 
			</div> 
		</div> 
        <!--选择地点-->
		<div id="selectItem2" class="selectItemhidden"> 
        	<div class="selectItem_top"></div>
			<div id="selectItemCount" class="selectItemcont"> 
                <div id="selectSub"> 
                    <input type="checkbox" name="dd01"  id="dd01" value="1"/><label for="dd01">北京1</label>
                    <input type="checkbox" name="dd02"  id="dd02" value="2"/><label for="dd02">北京2</label>
                    <input type="checkbox" name="dd03"  id="dd03" value="3"/><label for="dd03">北京3</label>
                    <input type="checkbox" name="dd09"  id="dd09" value="4"/><label for="dd09">北京4</label>
                </div> 
			</div> 
		</div> 
        
        <div class="mainpage_right">
        	<?php  require("inc/left_intro.php"); ?>
        </div>
        <div class="clear"></div>
    </div>

<?php
	require("../inc/copyright.php");
?>
</body>
</html>